package com.rs.game.player.dialogues.impl;

import com.rs.Settings;
import com.rs.game.World;
import com.rs.game.player.Player;
import com.rs.game.player.content.FadingScreen;
import com.rs.game.player.content.Magic;
import com.rs.game.player.controlers.StartTutorial;
import com.rs.game.player.dialogues.Dialogue;

public class TutorialOrNot extends Dialogue{


	StartTutorial controler;

	@Override
	public void finish() {
	}

	@Override
	public void run(int interfaceId, int componentId) {
		switch (stage) {
		case -1:
			switch (componentId) {
			case OPTION_1:
				player.getControlerManager().startControler("StartTutorial");
				end();
				break;
			case OPTION_2:
				for (final Player players : World.getPlayers()) {
					if (players == null)
						continue;
					FadingScreen.fade(player, new Runnable() {
						@Override
						public void run() {
							players.getPackets().sendGameMessage("<col=FF0000>All welcome "+player.getDisplayName()+ " to "+Settings.SERVER_NAME+"!");
							Magic.HomeTeleport(player, 2193, 3184, 0);
						}
					});
				}
				end();
				break;
			}
			break;
		}
	}

	@Override
	public void start() {
		sendOptionsDialogue("Would you like to do the Tutorial?", "Yes, I want to do the Tutorial and earn an extra 2.5M.",
				"No, I want to skip the tutorial.");
	}
}

